# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=belcard
pkgver=5.3.38
pkgrel=0
pkgdesc="C++ library to manipulate VCard standard format"
url="https://linphone.org/"
arch="all"
license="GPL-3.0-or-later"
options="!check" # not test available
makedepends="cmake bctoolbox-dev belr-dev samurai"
subpackages="$pkgname-dev $pkgname-libs"
source="$pkgname-$pkgver.tar.bz2::https://gitlab.linphone.org/BC/public/belcard/-/archive/$pkgver/belcard-$pkgver.tar.bz2
	fix-cmake-path.patch
	"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake \
		-DCMAKE_INSTALL_DATADIR=share \
		-DENABLE_STRICT=NO \
		-DBUILD_SHARED_LIBS=YES \
		-DENABLE_STATIC=NO \
		-DENABLE_UNIT_TESTS=NO
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
c64763df96a3fdb0e50e3022173ed195f7ac5a4836c547aeb129aecb7667fe76fa78b7b0aa948d2840c4476c474bd9c73249cf5bbd19a6c1ba7971fd969452d2  belcard-5.3.38.tar.bz2
325ded3645fa04c65a171b17fcdd69e3bb877f5e3f07935dfc0cad624921733d1ef9bb715705a61bf806129b055462f505ed6698df95d5e1d1b09105f274ee81  fix-cmake-path.patch
"
